Computer networks have become widely used in society today. Different types of devices may be coupled to these networks. Protocols have been developed to facilitate communications between the devices across these networks. For example, the point-to-point protocol (PPP) may be used.
In PPP connections, a point-to-point link may be established. In order to establish communications over a point-to-point link, each end of the link may first send packets that help configure the link. After the link has been established, the link can be authenticated before the transmission of packets. The PPP provides a standard method of encapsulating Network Layer protocol information over point-to-point links. PPP may be used to encapsulate data over data link connections; establish, configure, and test the data link connection; and establish and configure different network-layer protocols.
PPP may be tunneled using the L2TP protocol. The L2TP protocol is a protocol established by the Internet Engineering Task Force (IETF). User devices may be coupled to a L2TP Access Concentrator (LAC). The LAC is coupled to a network, for example, the Internet. The LAC may be coupled to other networks, as well. The network is coupled to a L2TP Network Server (LNS). The LNS may be coupled to other types of networks or devices, as well.
In a tunneling, a payload of data may be transferred from a node in the first network using the connections of a second network. The data payloads may be frames or packets conforming to any protocol. Instead of sending a frame as it is produced by the node in the first network, the frame may be encapsulated in an additional header. The additional header may provide routing information so that the encapsulated payload can traverse the second network.
The encapsulated packets may then be routed between tunnel endpoints over the second network via the tunnel. Once the encapsulated frames reach their destination endpoint, the frame may be unencapsulated and forwarded to its final destination.
A tunnel comprises a communication path between a LNS-LAC pair and may, for example, carry PPP datagrams between the LAC and the LNS. In addition, multiple sessions may be multiplexed over a single tunnel. A control connection operating in-band over the same tunnel controls the establishment, release, and maintenance of sessions and of the tunnel itself.
Control messages, for example, in a L2TP packet format, may be sent over a tunnel between a LNS and a LAC. To maximize extensibility while still permitting interoperability, a uniform method for encoding message types and bodies may be used. This encoding may be, for example, in the Attribute-Value Pair (AVP) format. The AVP may include a type field, a length field, and a value field. Other examples of messages and field values are possible. Other types of formats are possible.
Control messages may be used to establish and clear user sessions. For example, control messages are used to maintain the control connection itself. The control connection is initiated by an LAC or LNS after establishing the underlying tunnel-over-media connection.
Control messages may be sent as packets on the established tunnel connection between a given LNS-LAC pair. All data is sent in network order (high order octets first). Each control message may have a header, for example, including an AVP indicating the type of control message, followed by one or more AVPs appropriate for the given type of control message. The control messages may have other fields and use other formats, as well.
Various types of control messages are sent between the LAC and the LNS. For instance, the Start-Control-Connection-Request (SCCRQ) is an L2TP control message used to initialize the tunnel between an LNS and an LAC. The tunnel must be initialized through the exchange of these control messages before any other L2TP messages can be issued. The establishment of the control connection is started by the initiator of the underlying tunnel.
Another example of a control message sent between the LNS and the LAC is the Start-Control-Connection-Reply (SCCRP). The SCCRP message is an L2TP control message sent in reply to a received Start-Control-Connection-Request message. Sending this message indicates that the request was successful.